package cn.edu.dgut.css.springboottest2.Event;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationEvent;

/**
 * @Author:GooGa
 * @Data:2020/11/1 22:44
 */
public class NoticeEvent extends ApplicationEvent {

    private static final Logger logger = LoggerFactory.getLogger(NoticeEvent.class);

    /**
     * 存储信息
     **/
    private final String message;

    public NoticeEvent(String message) {
        super(message);
        this.message = message;
        logger.info("添加事件： message：{}", message);
    }

    public String getMessage() {
        return message;
    }
}
